Why is "#{String}" a common idiom in Ruby

Posted by Tetsujin no Oni on Stack Overflow See other posts from Stack Overflow or by Tetsujin no Oni
Published on 2010-05-10T21:00:28Z Indexed on 2010/05/10 21:04 UTC
Read the original article Hit count: 254

Filed under:
|
|
|

A Ruby dev I know asked this; my answer is below... Are there other, better reasons?

Why do so many Ruby programmers do

"{string}"

rather than

string

since the second form is simpler and more efficient?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about string